package ulmermark.demo.concurrency.core;

import ulmermark.demo.concurrency.core.inbox.Inbox;
import ulmermark.demo.concurrency.core.inbox.InboxFactory;

public abstract class AbstractResource{

	private final String name;
	private final Inbox inbox;
//	private final ResourceConfigParamFactory<?> configFactory;


	public AbstractResource( String name, final InboxFactory inboxFactory){
		this.name = name;
		this.inbox = inboxFactory.createInbox(name);
//		this.configFactory = configFactory;
	}
	
	public Inbox getInbox() {
		return inbox;
	}

	public abstract void onAppInit();

	public abstract void start();

	public void shutdown(){}

//	public ResourceConfigParamFactory getConfigFactory() {
//		return configFactory;
//	}
}
